import card
import constants
import random

class Deck:
    def __init__(self):
        self.cards = []

    def shuffle(self):
	random.shuffle(self.cards)

    def draw(self):
        return self.cards.pop()

    def generateFullSuite(self, suit):
        for x in range(2, 11):
            newCard = card.Card()
            newCard.value = x
            newCard.suit = suit
            newCard.deck = self
            print "Made card: ", newCard.value, " of ", constants.suitMap[newCard.suit]
            self.cards.append(newCard)
        for x in constants.royalty:
            newCard = card.Card()
            newCard.value = x
            newCard.suit = suit
            self.cards.append(newCard)

    def generateStd52(self):
        for eachSuit in constants.suits:
            self.generateFullSuite(eachSuit)
